Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Control the use of the cl4py readtable. #9

Closed
wants to merge 4 commits into from

Conversation

rpgoldman
Copy link
Contributor

The cl4py readtable is wrapped around everything done by Lisp running inside cl4py, instead of just being wrapped around reading from the stream of inputs from python.

In particular, this means that any lisp code compiled by cl4py is read with the cl4py readtable, which can cause breakage if the standard readtable is expected.

This tweak makes the cl4py readtable apply only around the read rather than the read and the eval, as before.

@marcoheisig
Copy link
Owner

This is a great suggestion. I will try to merge, test and upload the fix this week.

@rpgoldman
Copy link
Contributor Author

Probably a test would be a good idea -- is pytest ok? I have never used pyunit, and am not really interested in learning a new framework.

@marcoheisig
Copy link
Owner

Sure, any tests would be much appreciated. With some embarrassment I have to admit that, so far, my tests consisted of me running the examples in the README by hand before uploading a new version to PyPi.

@rpgoldman
Copy link
Contributor Author

Unfortunately, I really don't know how Travis works or how to set up tests that would involve SBCL. But I could see about pytest, and maybe you or someone else could make it work with Travis.

rpgoldman added a commit to siftech/cl4py that referenced this pull request Aug 12, 2020
Verify that the previous version of cl4py would experience errors because the python readtable was used to read *all* input to the lisp process (instead of only input from the Python process).
@rpgoldman
Copy link
Contributor Author

OK, now there are tests!

rpgoldman and others added 4 commits August 18, 2020 10:23
It was leaking state into the compiler, and breaking lots of code.
This is needed to be able to write the tests.
New pytests. Added before adding tests for this MR.
Verify that the previous version of cl4py would experience errors because the python readtable was used to read *all* input to the lisp process (instead of only input from the Python process).
@marcoheisig
Copy link
Owner

Merged. Thank you for all those contributions!

@rpgoldman rpgoldman deleted the fix-readtable branch August 21, 2020 15:20
@rpgoldman
Copy link
Contributor Author

Merged. Thank you for all those contributions!

Glad I could help! Thank you for the library!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants